package com.ysd.lis.controller.lab;

import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabDictitemVsChannel;
import com.ysd.lis.request.lab.LabDictitemVsChannelDto;
import com.ysd.lis.service.lab.LabDictitemVsChannelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/***
 *@title LabDictitemVsChannelController
 *@author WH
 *@version 1.0.0
 *@create 2024/12/18 19:27
 **/
@Api(tags = "报告项目通道号转译对照")
@RestController
@RequestMapping("/lis/labDictitemVsChanne")
public class LabDictitemVsChannelController extends BaseController {

    @Autowired
    private LabDictitemVsChannelService dictitemVsChannelService;

    @ApiOperation("查询报告项目通道号转译")
    @GetMapping("/findDictitemVsChannelList")
    public Result findDictitemVsChannelList(LabDictitemVsChannel labDictitemVsChannel) {

        return dictitemVsChannelService.findDictitemVsChannelList(labDictitemVsChannel);
    }

    @ApiOperation("查询报告项目通道号转译")
    @PostMapping("/deleteDictitemVsChannel")
    public Result deleteDictitemVsChannel(@RequestBody LabDictitemVsChannelDto dictitemVsChannelDto) {

        return dictitemVsChannelService.deleteDictitemVsChannel(dictitemVsChannelDto);
    }
    @ApiOperation("新增报告项目通道号转译")
    @PostMapping("/addLabDictitemVsChannel")
    public Result addDictitemVsChannel(@RequestBody LabDictitemVsChannel labDictitemVsChannel) {

        return dictitemVsChannelService.addDictitemVsChannel(labDictitemVsChannel);
    }
    @ApiOperation("保存报告项目通道号转译")
    @PostMapping("/saveLabDictitemVsChannelList")
    public Result saveLabDictitemVsChannelList(@RequestBody List<LabDictitemVsChannel> labDictitemVsChannels) {

        return dictitemVsChannelService.saveLabDictitemVsChannelList(labDictitemVsChannels);
    }
}
